<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<jsp:include page="WEB-INF/incl/htmlHeader.jsp" />
<title>Welcome! | Cult Cinema Inc</title>
</head>
<body id="index">
<jsp:include page="WEB-INF/incl/header.jsp" />
<div id="pageheader">
	<div class="container">
		<h1>Payment</h1>
	</div>
</div>
<div id="main" class="container">
	<div class="wrapper">
		<jsp:include page="WEB-INF/incl/messages.jsp" />
		<table class="data-table horizontal_table readonly"
				style="width: 100%">
				<tr>
					<th scope="col"><fmt:message key="house.houseName"
							bundle="${uitext}" />
					</th>
					<td><p>${requestScope.scheduleTO.houseName}</p>
					</td>
				</tr>
				<tr>
					<th scope="col"><fmt:message key="movie.name"
							bundle="${uitext}" />
					</th>
					<td><p>${requestScope.scheduleTO.movieName}</p>
					</td>
				</tr>
				<tr>
					<th scope="col"><fmt:message key="movie.category"
							bundle="${uitext}" />
					</th>
					<td><p>${requestScope.scheduleTO.movieCategory}</p>
					</td>
				</tr>
				<tr>
					<th scope="col"><fmt:message key="schedule.scheduleStart"
							bundle="${uitext}" />
					</th>
					<td><fmt:formatDate
							value="${requestScope.scheduleTO.scheduleStart}"
							pattern="dd/MM/yyyy hh:mmaaa" />
					</td>
				</tr>
				<tr>
					<th scope="col"><fmt:message key="schedule.price"
							bundle="${uitext}" />
					</th>
					<td>${requestScope.scheduleTO.price}</td>
				</tr>
				<tr>
					<th scope="col"><fmt:message key="scheduleSeatDetail.seatLocation"
							bundle="${uitext}" />
					</th>
					<td>
						<c:forEach var="seat" items="${requestScope.seatDetailList}">
							${seat.row}${seat.col}. 
						</c:forEach>
					</td>
				</tr>
			</table>
			<form method="post" action="payment.do" class="cssform">
				<input type="hidden" name="scheduleId" value="${requestScope.scheduleTO.id}" />
				<input type="hidden" name="loyaltyPointEarn" value="${requestScope.loyalityEarned}" />
				<c:if test="${not empty sessionScope.loggedInUser}">
				<p><fmt:message key="form.field.loyalty.point.to.be.earn" bundle="${uitext}" /> ${requestScope.loyalityEarned}</p>
				<p><fmt:message key="member.loyaltyPoint" bundle="${uitext}" /> ${sessionScope.loggedInUser.loyaltyPoint}</p>
				<p>
					<label class="f_label" for="loyaltyPoint"><fmt:message key="form.field.loyalty.point.to.be.used" bundle="${uitext}" /></label> 
					<input type="text" name="loyaltyPoint" value="0" />
				</p>
				</c:if>
				<p class="acts"><input type="submit" name="submit" id="submit" value="<fmt:message key="table.action.buy" bundle="${uitext}" />" class="text blue_btn"></p>
			</form>
	</div>
</div>
<jsp:include page="WEB-INF/incl/footer.jsp" />
</body>
</html>